package com.wang.lotterysystem.controller.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 奖品等级
 */
@AllArgsConstructor
@Getter
public enum ActivityPrizeTiersEnum {

    FIRST_PRIZE(1,"一等奖"),
    SECOND_PRIZE(2,"二等奖"),
    THIRD_PRIZE(3,"三等奖");

    private Integer code;

    private String message;

    public static ActivityPrizeTiersEnum checkForName(String name){
        for (ActivityPrizeTiersEnum activityPrizeTiersEnum : ActivityPrizeTiersEnum.values()) {
            if (activityPrizeTiersEnum.name().equalsIgnoreCase(name)){
                return activityPrizeTiersEnum;
            }
        }
        return null;
    }
}
